package com.handydata.antifraud.config;

import com.handydata.antifraud.lock.DistributedLock;
import com.handydata.antifraud.lock.RedisDistributedLock;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;



/**
 * @author fuwei.deng
 * @date 2017年6月14日 下午3:11:31
 * @version 1.0.0
 */
@Configuration
public class DistributedLockAutoConfiguration {
	
	@Bean
	public DistributedLock redisDistributedLock(RedisTemplate<String, Object> redisTemplate){
		return new RedisDistributedLock(redisTemplate);
	}
	
}
